package org.lord.slark.numbers.utils;

import org.lord.slark.numbers.entity.Saint;

import java.text.Collator;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;

/**
 * Created by Slark on 2016/6/3.
 */
public class SaintsTools {
    public static void sort(List<Saint> list) {
        Collections.sort(list, new Comparator<Saint>() {
            @Override
            public int compare(Saint saint1, Saint saint2) {
                return Collator.getInstance(Locale.CHINESE).compare(saint1.getName(), saint2.getName());
            }
        });
    }
}
